1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to a file system, and more particularly, to a method and apparatus for supporting a symbolic link at an application level while keeping the structure of an existing file system that does not support a symbolic link.
2. Description of the Related Art
An operating system (OS) uses a file system so as to manage data on a system, in which the OS is installed. The file system is a logical structure that should be constructed first so as to manage files. For example, in Microsoft Windows, a format command is used to create and initialize the file system. After the file system is created, a user can store or delete the files.
Various file systems exist according to the operating system. For example, there are various file systems, such as FAT (File Allocation Table) system or NTFS (New Technology File System) in operating systems of Windows series, and UFS (Unix File System), EXT2 (Extended 2), EXT3 (Extended 3), and JFS (Journaling File System) in operating systems of Unix/Linux series. Each of the file system provides additional functions, such as data encryption or data compression.
A file system for storing and managing files is broadly divided into two regions, that is, a data region and an information region. In the data region, actual data of a file is stored. In the information region, information of the corresponding file is stored. The attribute, authority, name, and position information of the file are stored in the information region.
In the operating systems of Unix/Linux series or NTFS, a separate field exists in the file system for supporting a symbolic link. Therefore, an application on the basis of the above-described file system can easily use the symbolic link. A symbolic link is a special kind of file that points to a file or directory, and a user can use the symbolic link as an original file or directory. Gaining access to the file or directory through a long path name can be accomplished by simply creating a symbolic link with respect to the path and using the symbolic link as an actual file or directory. However, a file system of the FAT series, such as FAT12, FAT16, or FAT32, does not have a separate field for supporting a symbolic link.
A mobile device, such as a cellular phone, a PDA (Personal Digital Assistant), a PMP (Portable Multimedia Player), an MP3 player, or a USB memory stick, which recently comes into the spotlight, adopts the file system of the FAT series. However, since the file system of the FAT series does not support a symbolic link, gaining access to data (file or directory) should be made through a long path name.
If a file system is not designed to support a symbolic link, a value for the symbolic link is not allocated in a field that represents the file attribute. Accordingly, a symbolic link cannot be used in such a file system. In the file system where the symbolic link cannot be used, it is difficult to use a file because a user is required to use a long path name when the user wants to access a file or directory having a long path name. If a file attribute field is arbitrarily changed and used in order to use a symbolic link function, compatibility of the file system may be degraded. Accordingly, there is a need to provide a symbolic link function while the structure or compatibility of the existing file system is preserved.